package com.ruoyi.system.service.impl.reseller;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.reseller.VsDramasResellerUserMapper;
import com.ruoyi.system.domain.reseller.VsDramasResellerUser;
import com.ruoyi.system.service.reseller.IVsDramasResellerUserService;

/**
 * 分销用户Service业务层处理
 * 
 * @author zzx
 * @date 2024-04-30
 */
@Service
public class VsDramasResellerUserServiceImpl implements IVsDramasResellerUserService 
{
    @Autowired
    private VsDramasResellerUserMapper vsDramasResellerUserMapper;

    /**
     * 查询分销用户
     * 
     * @param id 分销用户主键
     * @return 分销用户
     */
    @Override
    public VsDramasResellerUser selectVsDramasResellerUserById(Integer id)
    {
        return vsDramasResellerUserMapper.selectVsDramasResellerUserById(id);
    }

    /**
     * 查询分销用户列表
     *
     * @param vsDramasResellerUser 分销用户
     * @return 分销用户
     */
    @Override
    public List<VsDramasResellerUser> selectVsDramasResellerUserList(VsDramasResellerUser vsDramasResellerUser)
    {
        return vsDramasResellerUserMapper.selectVsDramasResellerUserList(vsDramasResellerUser);
    }

    /**
     * 新增分销用户
     * 
     * @param vsDramasResellerUser 分销用户
     * @return 结果
     */
    @Override
    public int insertVsDramasResellerUser(VsDramasResellerUser vsDramasResellerUser)
    {
        vsDramasResellerUser.setCreatetime(System.currentTimeMillis());
        return vsDramasResellerUserMapper.insertVsDramasResellerUser(vsDramasResellerUser);
    }

    /**
     * 修改分销用户
     * 
     * @param vsDramasResellerUser 分销用户
     * @return 结果
     */
    @Override
    public int updateVsDramasResellerUser(VsDramasResellerUser vsDramasResellerUser)
    {
        return vsDramasResellerUserMapper.updateVsDramasResellerUser(vsDramasResellerUser);
    }

    /**
     * 批量删除分销用户
     * 
     * @param ids 需要删除的分销用户主键
     * @return 结果
     */
    @Override
    public int deleteVsDramasResellerUserByIds(Integer[] ids)
    {
        return vsDramasResellerUserMapper.deleteVsDramasResellerUserByIds(ids);
    }

    /**
     * 删除分销用户信息
     * 
     * @param id 分销用户主键
     * @return 结果
     */
    @Override
    public int deleteVsDramasResellerUserById(Integer id)
    {
        return vsDramasResellerUserMapper.deleteVsDramasResellerUserById(id);
    }
}
